package com.itheima.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("bs_user")
public class BsUser implements Serializable {
    private static final long serialVersionUID = 802769824800927065L;
    //Id
    @TableId(type = IdType.AUTO)
    private Integer id;
    //头像
    private String avatar;
    //创建时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    //邮箱
    private String email;
    //介绍
    private String introduction;
    //最后修改时间
    @TableField(value = "last_update_time",fill = FieldFill.INSERT_UPDATE)
    private Date lastUpdateTime;
    //密码
    private String password;
    //手机号码
    private String phone;
    //账号状态 0为启用，1为禁用
    @TableField(value = "status")
    private Integer status;
    @TableField(exist = false)
    private Integer is_deleted;
    //用户名称
    private String username;
    //性别
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String sex;
    //角色
    private String role;
    //权限组ID
    @TableField(value = "permission_group_id")
    private Long permissionGroupId;
    @TableField(exist = false)
    private Long permission_group_id;
    //权限组名称
    @TableField(exist = false)
    private String permission_group_title;


    public Long getPermission_group_id() {
        return permissionGroupId;
    }

    public Long getPermissionGroupId() {
        return permission_group_id;
    }

    public Integer getIs_deleted() {
        return status;
    }

    @Override
    public String toString() {
        return "BsUser{" +
                "id=" + id +
                ", avatar='" + avatar + '\'' +
                ", createTime=" + createTime +
                ", email='" + email + '\'' +
                ", introduction='" + introduction + '\'' +
                ", lastUpdateTime=" + lastUpdateTime +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", status=" + status +
                ", is_deleted=" + is_deleted +
                ", username='" + username + '\'' +
                ", sex='" + sex + '\'' +
                ", role='" + role + '\'' +
                ", permissionGroupId=" + permissionGroupId +
                ", permission_group_id=" + permission_group_id +
                ", permission_group_title='" + permission_group_title + '\'' +
                '}';
    }
}
